package com.example.interfacejump;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import java.time.Instant;

public class MainActivity2 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        Button button = findViewById(R.id.tuichu);  //找到控件
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //处理监听
                Log.i("wodedianji","界面二点击了");
//                Intent intent = new Intent(MainActivity2.this,MainActivity.class);
//                startActivity(intent);
                finish();
            }
        });
    }
}